/*
 *      world.h
 *      
 *      Copyright 2008 AL <skylark@skylark-desktop>
 */

#ifndef WORLD_H
#define WORLD_H

#include <vector>
#include <Box2D.h>
//#include "stone.h"

#define WORLD_GRAVITY_CONSTANT /*0.00025*/0.2
#define WORLD_SOLVER_ITERATIONS 10
#define WORLD_BOUNDING_BOX_RANGE 10000

typedef enum {sysUnready, sysRunnable, sysRunning, sysShuttingDown, sysFailure} ESysStatus;

class World
{
	public:

	  World(void);
      ~World();
	  void step(float _time=0.03);
	  //void insertStone(Stone *s);

	  ESysStatus getStatus();
      //std::vector<Stone *> stones;

 	  b2World *world;

	private:
  	  /* add your private declarations */
      ESysStatus status;
	  /* Box2D-variables */
	  //collision(Stone *s1, Stone *s2); // merge objects?

	float time;
};

//int StoneCollision(cpShape *a, cpShape *b, cpContact *contacts, int numContacts, cpFloat normal_coef, void *data);


#endif /* WORLD_H */ 
